'use strict';

/**
 * @ngdoc function
 * @name mytodoApp.controller:MainCtrl
 * @description
 * # MainCtrl
 * Controller of the mytodoApp
 */
angular.module('myTimeLine') 
  .controller('TopicsCtrl',[ '$scope', 'TopicService',function ($scope,TopicService) {
    

    TopicService.getAllTopics(function(data){
      $scope.topics=data.items;
    },function(){
      alert('获取失败');
    });


    $scope.getMoreTopics=function(){
      // 加载分页话题
    }

  }])
  .controller('AddTopicCtrl',['$scope','TopicService',function($scope,TopicService){
    
  }]);
